Integrand size = 15, antiderivative size = 62 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=6 e^{2 i a} x-\frac {x^3}{3}-\frac {2 e^{2 i a} x^3}{e^{2 i a}+x^2}-6 e^{3 i a} \arctan \left (e^{-i a} x\right ) \]
[Out]
Time = 0.10 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.400, Rules used = {4591, 456, 474, 470, 327, 209} \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-6 e^{3 i a} \arctan \left (e^{-i a} x\right )-\frac {2 e^{2 i a} x^3}{x^2+e^{2 i a}}+6 e^{2 i a} x-\frac {x^3}{3} \]
[In]
[Out]
Rule 209
Rule 327
Rule 456
Rule 470
Rule 474
Rule 4591
Rubi steps \begin{align*} \text {integral}& = \int \frac {\left (i-\frac {i e^{2 i a}}{x^2}\right )^2 x^2}{\left (1+\frac {e^{2 i a}}{x^2}\right )^2} \, dx \\ & = \int \frac {x^2 \left (-i e^{2 i a}+i x^2\right )^2}{\left (e^{2 i a}+x^2\right )^2} \, dx \\ & = -\frac {2 e^{2 i a} x^3}{e^{2 i a}+x^2}-\frac {1}{2} e^{-2 i a} \int \frac {x^2 \left (-10 e^{4 i a}+2 e^{2 i a} x^2\right )}{e^{2 i a}+x^2} \, dx \\ & = -\frac {x^3}{3}-\frac {2 e^{2 i a} x^3}{e^{2 i a}+x^2}+\left (6 e^{2 i a}\right ) \int \frac {x^2}{e^{2 i a}+x^2} \, dx \\ & = 6 e^{2 i a} x-\frac {x^3}{3}-\frac {2 e^{2 i a} x^3}{e^{2 i a}+x^2}-\left (6 e^{4 i a}\right ) \int \frac {1}{e^{2 i a}+x^2} \, dx \\ & = 6 e^{2 i a} x-\frac {x^3}{3}-\frac {2 e^{2 i a} x^3}{e^{2 i a}+x^2}-6 e^{3 i a} \arctan \left (e^{-i a} x\right ) \\ \end{align*}
Time = 0.10 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.61 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-\frac {x^3}{3}+4 x \cos (2 a)-6 \arctan (x (\cos (a)-i \sin (a))) \cos (3 a)+4 i x \sin (2 a)+\frac {2 x (\cos (3 a)+i \sin (3 a))}{\left (1+x^2\right ) \cos (a)-i \left (-1+x^2\right ) \sin (a)}-6 i \arctan (x (\cos (a)-i \sin (a))) \sin (3 a) \]
[In]
[Out]
Time = 2.92 (sec) , antiderivative size = 48, normalized size of antiderivative = 0.77
method | result | size |
risch | \(-\frac {7 x^{3}}{3}+\frac {2 x^{3}}{1+\frac {{\mathrm e}^{2 i a}}{x^{2}}}+6 \,{\mathrm e}^{2 i a} x -6 \arctan \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{3 i a}\) | \(48\) |
[In]
[Out]
none
Time = 0.24 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.39 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-\frac {x^{5} - 11 \, x^{3} e^{\left (2 i \, a\right )} - 18 \, x e^{\left (4 i \, a\right )} + 9 \, {\left (i \, x^{2} e^{\left (3 i \, a\right )} + i \, e^{\left (5 i \, a\right )}\right )} \log \left (x + i \, e^{\left (i \, a\right )}\right ) + 9 \, {\left (-i \, x^{2} e^{\left (3 i \, a\right )} - i \, e^{\left (5 i \, a\right )}\right )} \log \left (x - i \, e^{\left (i \, a\right )}\right )}{3 \, {\left (x^{2} + e^{\left (2 i \, a\right )}\right )}} \]
[In]
[Out]
Time = 0.17 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.06 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=- \frac {x^{3}}{3} + 4 x e^{2 i a} + \frac {2 x e^{4 i a}}{x^{2} + e^{2 i a}} - 3 \left (- i \log {\left (x - i e^{i a} \right )} + i \log {\left (x + i e^{i a} \right )}\right ) e^{3 i a} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 254 vs. \(2 (45) = 90\).
Time = 0.31 (sec) , antiderivative size = 254, normalized size of antiderivative = 4.10 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-\frac {2 \, x^{5} - 22 \, x^{3} {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} - 36 \, x {\left (\cos \left (4 \, a\right ) + i \, \sin \left (4 \, a\right )\right )} - 18 \, {\left (x^{2} {\left (\cos \left (3 \, a\right ) + i \, \sin \left (3 \, a\right )\right )} + {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \cos \left (3 \, a\right ) - {\left (-i \, \cos \left (2 \, a\right ) + \sin \left (2 \, a\right )\right )} \sin \left (3 \, a\right )\right )} \arctan \left (\frac {2 \, x \cos \left (a\right )}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}, \frac {x^{2} - \cos \left (a\right )^{2} - \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right ) + 9 \, {\left (x^{2} {\left (-i \, \cos \left (3 \, a\right ) + \sin \left (3 \, a\right )\right )} + {\left (-i \, \cos \left (2 \, a\right ) + \sin \left (2 \, a\right )\right )} \cos \left (3 \, a\right ) + {\left (\cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )} \sin \left (3 \, a\right )\right )} \log \left (\frac {x^{2} + \cos \left (a\right )^{2} + 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}{x^{2} + \cos \left (a\right )^{2} - 2 \, x \sin \left (a\right ) + \sin \left (a\right )^{2}}\right )}{6 \, {\left (x^{2} + \cos \left (2 \, a\right ) + i \, \sin \left (2 \, a\right )\right )}} \]
[In]
[Out]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 141 vs. \(2 (45) = 90\).
Time = 0.46 (sec) , antiderivative size = 141, normalized size of antiderivative = 2.27 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-\frac {x^{5}}{3 \, {\left (x^{2} + \frac {e^{\left (4 i \, a\right )}}{x^{2}} + 2 \, e^{\left (2 i \, a\right )}\right )}} + \frac {10 \, x^{3} e^{\left (2 i \, a\right )}}{3 \, {\left (x^{2} + \frac {e^{\left (4 i \, a\right )}}{x^{2}} + 2 \, e^{\left (2 i \, a\right )}\right )}} - 6 \, \arctan \left (x e^{\left (-i \, a\right )}\right ) e^{\left (3 i \, a\right )} + \frac {35 \, x e^{\left (4 i \, a\right )}}{3 \, {\left (x^{2} + \frac {e^{\left (4 i \, a\right )}}{x^{2}} + 2 \, e^{\left (2 i \, a\right )}\right )}} + \frac {2 \, x e^{\left (4 i \, a\right )}}{x^{2} + e^{\left (2 i \, a\right )}} + \frac {8 \, e^{\left (6 i \, a\right )}}{{\left (x^{2} + \frac {e^{\left (4 i \, a\right )}}{x^{2}} + 2 \, e^{\left (2 i \, a\right )}\right )} x} \]
[In]
[Out]
Time = 27.68 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.84 \[ \int x^2 \tan ^2(a+i \log (x)) \, dx=-6\,{\left ({\mathrm {e}}^{a\,2{}\mathrm {i}}\right )}^{3/2}\,\mathrm {atan}\left (\frac {x}{\sqrt {{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )-\frac {x^3}{3}+4\,x\,{\mathrm {e}}^{a\,2{}\mathrm {i}}+\frac {2\,x\,{\mathrm {e}}^{a\,4{}\mathrm {i}}}{x^2+{\mathrm {e}}^{a\,2{}\mathrm {i}}} \]
[In]
[Out]